<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<html>
<head>
	<title>密码修改</title>
   	<%@ include file="/WEB-INF/jsp/public/commons.jspf" %>
   	<script type="text/javascript">
   	
   	$(function() {

	var yz1;
	var yz2;

	$("#yz1").blur(function() {
		// 验证是否为空
		if ($("#yz1").val().trim() == "") {
			$("#msg1").html("不能为空");
			yz1 = false;
		} else if(/^[0-9a-zA-Z_]{5,15}$/.test($("#yz1").val())) {
			$("#msg1").html("");
			yz1 = true;
		}else{
		$("#msg1").html("5-15位数字,字母,下划线组合");
		}
	});

	$("#yz2").blur(function() {
		if ($("#yz2").val().trim() == "") {
			$("#msg2").html("不能为空");
			yz2 =false;
		} else if(($("#yz1").val())==($("#yz2").val())){
			$("#msg2").html("");
			yz2 =true;
		}else{
		$("#msg2").html("两次密码不一致");
		}
	});

	$("#save").bind("click", function() {
		if(yz1&&yz2){
			return true;
		}else{
			if ($("#yz1").val().trim() == "") {
			$("#msg1").html("不能为空");
		} 
		
		if ($("#yz2").val().trim() == "") {
			$("#msg2").html("不能为空");
		} 
			return false;
		}
	});
});
   	</script>
</head>
<body>

<!-- 标题显示 -->
<div id="Title_bar">
    <div id="Title_bar_Head">
        <div id="Title_Head"></div>
        <div id="Title"><!--页面标题-->
            <img border="0" width="13" height="13" src="${pageContext.request.contextPath}/style/images/title_arrow.gif"/>密码修改
        </div>
        <div id="Title_End"></div>
    </div>
</div>

<!--显示表单内容-->
<div id=MainArea>

    <s:form action="user_updatePwd">
    	<s:hidden name="id"></s:hidden>
        
        <div class="ItemBlock_Title1"><!-- 信息说明 --><div class="ItemBlock_Title1">
        	<img border="0" width="4" height="7" src="${pageContext.request.contextPath}/style/blue/images/item_point.gif" /> 密码修改 </div> 
        </div>
        
        <!-- 表单内容显示 -->
        <div class="ItemBlockBorder">
            <div class="ItemBlock">
                <table cellpadding="0" cellspacing="0" class="mainForm">
                  	 <font color="red"><s:fielderror/></font>
                    <tr><td>用户名</td>
                        <td>
                        ${user.username}
						</td>
                    </tr>
                    <tr><td>密码</td>
                        <td><input id="yz1" name="password" cssClass="InputStyle"/> *<label id="msg1"></label></td>
                    </tr>
                     <tr><td>确认密码</td>
                        <td><input id="yz2" name="rePassword" cssClass="InputStyle"/> *<label id="msg2"></label></td>
                    </tr>
					
                </table>
            </div>
        </div>
        
	
        <!-- 表单操作 -->
        <div id="InputDetailBar">
            <input id="save" type="image" src="${pageContext.request.contextPath}/style/images/save.png"/>
            <a href="javascript:history.go(-1);"><img src="${pageContext.request.contextPath}/style/images/goBack.png"/></a>
        </div>
    </s:form>
</div>


</body>
</html>
